<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title></title>
<link href="../../css/newStyle.css" type="text/css" rel="stylesheet" />
<script src="../../js/jquery-1.7.2.min.js"   type="text/javascript" ></script>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/utils.js"></script>
<script type="text/javascript" src="../../js/openId.js"></script>
<script type="text/javascript" src="../../js/swipe.js"></script>
<script type="text/javascript" src="../../js/header&footer.js"></script>
<script type="text/javascript" src="../../js/carService.js"></script>
<script type="text/javascript" src="../../js/check.js"></script>
<script type="text/javascript" src="../../js/qmsk-1.1.js"></script>
<script type="text/javascript" src="../../js/ad.js"></script>
<script type="text/javascript" src="../../js/zepto.js"></script>
        <link rel="stylesheet" type="text/css" href="../../css/font-awesome.css" media="all" />
<script type="text/javascript">
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	WeixinJSBridge.call('showOptionMenu');
});
var dutyId = null;
$(function(){
	id=getIdByName("id");
	
	
	share_img = 'http://s-112521.gotocdn.com/LGDCWxWeb/html/images/lgdcLogo.jpg';  
		$.ajax({
		url:'../../../carLesson/find/carLessonById',
		type:'get',
		async:false,
		data:{'id':id,'shopId':_shopId},
		success:function(data){
			var dt = JSON.parse(data);
			var nameList= new Array();
			if(dt.state==0){
					var index= getHtmlString(getHeadIndexValue(0, dt, "indexUrl"))
					var imageUrl= getHtmlString(getHeadIndexValue(0, dt, "imageUrl"))
					var title= getHtmlString(getHeadIndexValue(0, dt, "title").replace(/<br>/g,"").replace(/<\/br>/g,"")).replace(/<b>/g,"").replace(/<\/b>/g,"").replace(/<B>/g,"")
					$("#imageUrl").attr("src",imageUrl);
					$("#applyname").html(title)
					document.title=getHtmlString(getHeadIndexValue(0, dt, "title").replace(/<br>/g,"").replace(/<\/br>/g,"")).replace(/<b>/g,"").replace(/<\/b>/g,"").replace(/<B>/g,"")
				shareTitle=getHeadIndexValue(0, dt, "title").replace(/<br>/g,"").replace(/<\/br>/g,"")
				if(title=="青城河谷"){
					loadAd("banner",11)
					dutyId = 99
					$("#quickPhone").attr("href","tel:028-69760606")
					$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.905293,103.651465&title=%E9%9D%92%E5%9F%8E%E6%B2%B3%E8%B0%B7&output=html&src=qmsk")
				}else if(title=="金双楠"){
					$("#quickPhone").attr("href","tel:028-69261818")
					$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.679943,104.067923&title=COCO%E5%9B%BD%E9%99%85&output=html&src=qmsk")
					loadAd("banner",17)
					dutyId = 97
				}else if(title=="COCO国际"){
					$("#quickPhone").attr("href","tel:028-69263333")
					loadAd("banner",12)
						$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.679943,104.067923&title=COCO%E5%9B%BD%E9%99%85&output=html&src=qmsk")
				dutyId = 92
				}else if(title=="锦绣城"){
					$("#quickPhone").attr("href","tel:028-82005252")
						loadAd("banner",13)
					$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.679943,104.067923&title=COCO%E5%9B%BD%E9%99%85&output=html&src=qmsk")
				dutyId = 98
				}else if(title=="东方天地"){
					$("#quickPhone").attr("href","tel:028-82007966")
						loadAd("banner",14)
					$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.676285,104.144164&title=%E4%B8%9C%E6%96%B9%E5%A4%A9%E5%9C%B0&output=html&src=qmsk")
			dutyId = 94
				}else if(title=="花满庭2期"){
					$("#quickPhone").attr("href","tel:028-82006988")
						$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.768372,104.051189&title=%E8%8A%B1%E6%BB%A1%E5%BA%AD2%E6%9C%9F&output=html&src=qmsk")
						loadAd("banner",15)
		dutyId = 95
				}else if(title=="COCO金沙"){
					$("#quickPhone").attr("href","tel:028-82009966")
						$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.689151,103.992068&title=COCO%E9%87%91%E6%B2%99&output=html&src=qmsk")
						loadAd("banner",16)
		dutyId = 101
				}else if(title=="空港"){
					$("#quickPhone").attr("href","tel:028-85881668")
						loadAd("banner",19)
					$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.62103,104.05238&title=%E7%A9%BA%E6%B8%AF&output=html&src=qmsk")
			dutyId = 100
				}else if(title=="幸福满庭"){
					dutyId = 96;
					loadAd("banner",18)
					$("#quickPhone").attr("href","tel:028-69390888")
					$("#quickAddress").attr("href","http://api.map.baidu.com/marker?zoom=11&location=30.763809,103.978242&title=%E5%B9%B8%E7%A6%8F%E6%BB%A1%E5%BA%AD&output=html&src=qmsk")
				}
				
			}
			}
	});
	getall(id);
	/* new qmsk.SiglePinterest({ 
		url : '../../../carLesson/find/adList', // 请求地址，插件会自动在 url 后追加 /n/n
		initPage : 1, // 首次加载页数
		size : 2, // 每次加载数量，即每页的大小
		success : printDataToPage, // 成功回调
		valves : 100 ,//当滚动条距离底部该像素的时候加载
		data:{'typeId':1,'shopId':_shopId}
	}); */
})

/**
 * 将查询返回的数据显示到页面上，参数是服务器返回的查询报文，json对象
 */
/* function printDataToPage(dt) {
	var htm="";
	for ( var i = 0; i < dt.row; i++) {
		var index= dt.getValue("indexUrl",i) 
		var flag= false;
		if(IsEmpty(index)){
			flag=true
		}
	 htm+="<dl onclick='toS("+dt.getValue("id",i)+","+flag+")' class=\"shopInside news\"><dt><img src=\""+dt.getValue("imageUrl",i)+"\"></dt><dd><strong class=\"title\">"+dt.getValue("title",i)+"</strong><p>"+dt.getValue("memo",i)+" </p></dd></dl>"
	}
	$("#info").append(htm)
	format("shopInside","28","26","14","12");

	} */
	//分页和其他
	//pagination(message.result.len);
	//$("#sup").html('共 ' + message.result.len + ' 条');


function getall(parentId){
	$.ajax({
		url:'../../../carLesson/find/adList',
		type:'get',
		async:false,
		data:{'parentId':parentId,'shopId':_shopId},
		success:function(data){
			var dt = JSON.parse(data);
			var nameList= new Array();
			if(dt.state==0){
				
				
				for(var i = 0;i<dt.result.data.length;i++){
					var keyWord = getHtmlString(getHeadIndexValue(i, dt, "keyWord"))
					var index= getHtmlString(getHeadIndexValue(i, dt, "indexUrl"))
					var flag= false;
					if(IsEmpty(index)){
						flag=true
					}
					if(i%2==0){
					var dl="<dl class=\"buildList\" onclick=\"toS(\'"+getHtmlString(getHeadIndexValue(i, dt, "id"))+"')\"><dd class=\"fl\" style=\"background:#85c9d4;\"><strong class=\"title\">"+getHtmlString(getHeadIndexValue(i, dt, "title"))+"</strong><span class=\"goRow\"></span></dd><dt><img src=\""+getHtmlString(getHeadIndexValue(i, dt, "imageUrl"))+"\"></dt></dl>"
					}else{
					var dl="<dl class=\"buildList\" onclick=\"toS(\'"+getHtmlString(getHeadIndexValue(i, dt, "id"))+"')\"><dt class='fl'><img src=\""+getHtmlString(getHeadIndexValue(i, dt, "imageUrl"))+"\"></dt><dd style=\"background:#b9a685\"><strong class=\"title\">"+getHtmlString(getHeadIndexValue(i, dt, "title"))+"</strong><span class=\"goRow\"></span></dd></dl>"	
					}
					//var dl="<dl onclick=\"toS(\'"+getHtmlString(getHeadIndexValue(i, dt, "id"))+"')\" class=\"shopInside news\"><dt><img src=\""+getHtmlString(getHeadIndexValue(i, dt, "imageUrl"))+"\"></dt><dd><strong class=\"title\">"+getHtmlString(getHeadIndexValue(i, dt, "title"))+"</strong><p>"+getHtmlString(getHeadIndexValue(i, dt, "memo"))+" </p></dd></dl>"
		
						$("#allInfo").append(dl)
					
				}

				}
		}
	});
}


function toS(id){
	redirectUrl('homeStyle2.html?openId='+_openId+"&shopId="+_shopId+"&id="+id+"&dutyId="+dutyId)
}
function yy(){
	redirectUrl('dvPers.html?openId='+_openId+"&shopId="+_shopId+"&id="+id+"&dutyId="+dutyId)
}
</script>
</head>

<body>
<div class="wrapper">
  <div class="container">
  <div class='goLink'><a href='javascript:void(0)' onclick="yy()" class='moreLink'><em>预约看房</em><span></span></a></div>
    <!-- <div class="actor">
      <dl>
        <dt><img src="" id="imageUrl"></dt>
      </dl>
     
    </div> -->
    <div id='banner' class='swipe'>
            <!-- <div class='swipe-wrap'>
                <div class="ad"><img src="../../images/ban1.jpg" />
                    <p>
                        会员
                    </p>
                </div>
                <div class="ad"><img src="../../images/ban2.jpg" />
                    <p>
                        俱乐部
                    </p>
                </div>
                <div class="ad"><img src="../../images/ban3.jpg" />
                    <p>
                        优惠券
                    </p>
                </div>
            </div> -->
        </div>
    
    <div id="allInfo">
      <!--<dl class="buildList" onClick="redirectUrl('homeStyle.html')">
        <dd class="fl" style="background:#85c9d4;"><strong class="title">建筑<br>实景</strong><span class="goRow"></span></dd>
    	<dt><img src="../../images/sw1.jpg"></dt>
    </dl>
     <dl class="buildList" onClick="redirectUrl('homeStyle.html')">
    	<dt class="fl"><img src="../../images/sw1.jpg"></dt>
        <dd style="background:#b9a685"><strong class="title">品质<br>生活</strong><span class="goRow"></span></dd>
    </dl>
     <dl class="buildList" onClick="redirectUrl('homeStyle.html')">
        <dd class="fl" style="background:#bf9f62;"><strong class="title" style="margin-top:-15px;left:16%">样板房</strong><span class="goRow"></span></dd>
    	<dt><img src="../../images/sw1.jpg"></dt>
    </dl> -->
    </div>
  </div>
</div>
</body>
</html>
